import request from '@utils/request'

// 查询维修时间段
export function getTime (data) {
  return request({
    url: '/time/find',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 新增维修时间段
export function addTime (data) {
  return request({
    url: '/time/save',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 删除维修时间段
export function deleteTime (data) {
  return request({
    url: '/time/delete',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

